
using Google.Protobuf.WellKnownTypes;

namespace ABA
{
    public class PacketHeader : IPacketHeader, IReference
    {
        public int SeqID
        {
            get;
            set;
        }

        public int OrderTypeID
        {
            get;
            set;
        }

        public int TimeStamp
        {
            get;
            set;
        }

        public int PacketLength
        {
            get;
            set;
        }
        public bool IsValid
        {
            get
            {
                return PacketLength >= 0;
            }
        }

        public void Clear()
        {
            SeqID = 0;
            OrderTypeID = 0;
            TimeStamp = 0;
            PacketLength = 0;
        }
    }    
}

